﻿using System.ServiceModel;

namespace PESWeb.Services
{
    using System.ServiceModel.Web;
    using Campeonato.Model;
    using PES.Model;

    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IServices" in both code and config file together.
    [ServiceContract]
    public interface IServices
    {
        [OperationContract]
        [WebGet(UriTemplate = "Rank/{_campeonato}",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
        Jogador[] GetRank(string _campeonato);

        [OperationContract]
        [WebGet(UriTemplate = "Campeonato/",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
        Campeonato[] GetCampeonatos();

        [OperationContract]
        [WebGet(UriTemplate = "Campeonato/{_campeonato}",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
        Campeonato[] GetCampeonato(string _campeonato);

        [OperationContract]
        [WebGet(UriTemplate = "Partida?campid={_campeonato}&datap={_dataPartida}",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
        Partida[] GetTodasPartidas(string _campeonato, string _dataPartida);

        [OperationContract]
        [WebGet(UriTemplate = "Partida/{_partida}",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
        Partida GetPartida(string _partida);

        [OperationContract]
        [WebGet(UriTemplate = "JogadorVirtual?userid={_userId}",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
        JogadorVirtual[] GetJogadorVirtual(string _userId);
    }
}
